home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 2 / The Arsenal Files 2 (Arsenal Computer).ISO / wildcat / vham.wcc < prev    next >
Text File  |  1994-08-01  |  3KB  |  90 lines

  1. rem this quick and dirty program uses the buckmaster hcall program
  2. rem and its associated database to verify a user based on his callsign
  3. rem and year of birth.  easily modified for other stuff.
  4.  
  5. rem assumes that the callsign is stored in user.computerType, but
  6. rem this too can be modified
  7.  
  8. rem have fun
  9.  
  10. rem brad.shipp@chowda.com (or 1:323/120)
  11.  
  12.  
  13. rem constants
  14.    const CDROMDrive = "Z:"
  15.    const WCDrive = "H:"
  16.    const newSecLevel = "VERIFIED"
  17.  
  18. rem variable declarations
  19.  
  20.    dim CurrentUser as string*25
  21.    dim CallSign as string*6
  22.    dim birthDate as string*8
  23.    dim BirthYear as string*2
  24.    dim temp as string
  25.    dim commandLine as string
  26.    dim CDROMYearofBirth as string*2
  27.    dim workFile as string
  28.  
  29.  rem environment
  30.    carrierCheck on
  31.  
  32. rem get needed data from user record
  33.    callsign=user.company
  34.    birthYear=formatDate(user.birthdate,"YY")
  35.    callsign=left(user.computerType,6)
  36.  
  37. rem display to user
  38.    cls
  39.    Print "Ham Radio Callsign Verifier"
  40.    Print
  41.    Print "Please verify the following information..."
  42.    print
  43.    print "User name:     ";user.name
  44.    print "Callsign :     ";callsign
  45.    print "Date of birth: ";birthYear
  46.  
  47.    if not inputYesNo("Is this information correct?") then
  48.       print "Please correct this information using the [Y] command from the main menu."
  49.       waitEnter
  50.    else
  51.  
  52.         rem build hcall command line
  53.            commandLine = CDRomDrive+"HCALL "+CDRomDrive+" "+callsign + ">"+wcDrive+"hcall.TMP"
  54.  
  55.         rem calculate path to work file
  56.            workFile=left(tempPath,len(tempPath)-5)+"hcall.tmp"
  57.  
  58.         rem for debugging, display it to the user
  59.            cls
  60.            print "Getting data from CDROM Database... please wait!"
  61.  
  62.         rem run the command
  63.            shell commandLine
  64.  
  65.         rem get data from temp file
  66.             print "Database lookup completed... "
  67.             print
  68.  
  69.             OPEN workFile FOR INPUT AS #1
  70.             Input #1, temp
  71.             input #1, temp
  72.             input #1, temp
  73.             Input #1, temp
  74.             input #1, temp
  75.             Close #1
  76.  
  77.             temp=trim(temp)
  78.             CDRomYearOfBirth=mid(temp,11,2)
  79.  
  80.             if val(CDRomYearOfBirth)=val(birthYear) then
  81.                print "User data confirmed.  Upgrade successful."
  82.                user.secLevel=newSecLevel
  83.             else
  84.                print "User data not confirmed.  Upgrade failed."
  85.             end if
  86.  
  87.             waitEnter
  88.  
  89.       end if
  90.